<{include file="../common/iframe_header.tpl"}>
<form name='myForm1' id='myForm1' method='post' action='/webadmin/netQuestion/dohuanfen'>
    <div style='margin:10px;'>
        <table>
            <tr><td>是否还分：</td><td><input name='isreturn' id="isreturn" class="input-text" type='text' value='<{$qbm.isreturn}>' />(0不还分，>0为还的分值,此题标准分为<b style="color:red;"><{$question.standard_score}></b>)</td></tr>
            <tr><td>审核意见：</td><td><textarea name='suggestion' cols='60' rows='5'><{$qbm.suggestion}></textarea></td></tr>
            <tr><td colspan='2'><input type='submit' class="button" value='提交'></td></tr>
        </table>
            <input type="hidden" name="standard_score" id="standard_score" value="<{$question.standard_score}>" />
            <input name='qbm_id' type='hidden' value='<{$qbm.qbm_id}>' />
            <input type="hidden" name="nq_id" value="<{$nq_id}>" />
            <input type="hidden" name="subject_id" value="<{$subject_id}>" />
    </div>
</form>
<script>
    $(document).ready(function() {     
            var options = {         
                beforeSubmit:  showRequest,  
                success:       showResponse,
                dataType:  'json'
            }
            $('#myForm1').ajaxForm(options);   
    });
        function showRequest(formData, jqForm, options) { 
            //判断还的分值是否超过标准分
            var huanfen_score = $('#isreturn').val();
            var standard_score = $('#standard_score').val();
            if (huanfen_score > standard_score) {
                alert('还分分值不能大于标准分！');return false;
            }
            return true;
        }
        function showResponse(responseText, statusText, xhr, $form)  { 
            alert(responseText.note);
            if (responseText.status==1) {
                window.parent.location.reload();
            }
        }
</script>